package com.moleq.test;

import android.database.sqlite.SQLiteDatabase;

public class Connection {

	private SQLiteDatabase mDB;
	private String mDbPath = "";

	public Connection(String dbPath) {
		mDbPath = dbPath;
	}

	public void setDbPath(String dbPath) {
		mDbPath = dbPath;
	}

	public SQLiteDatabase getDB() {
		mDB = SQLiteDatabase.openOrCreateDatabase(mDbPath, null);
		return mDB;
	}

	public boolean isConnected() {
		boolean result = false;
		if (mDB != null) {
			result = mDB.isOpen();
		}
		return result;
	}

}
